﻿<phone:PhoneApplicationPage x:Name="historicalchartPage"
    x:Class="TaiwanPP.WP8App.historicalPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:libViewModels="clr-namespace:TaiwanPP.Library.ViewModels;assembly=TaiwanPP.Library"
    xmlns:libModels="clr-namespace:TaiwanPP.Library.Models;assembly=TaiwanPP.Library"
    xmlns:oxy="clr-namespace:OxyPlot.WP8;assembly=OxyPlot.WP8"
    xmlns:Helpers="clr-namespace:TaiwanPP.WP8App.Helpers"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneContrastForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True"
    shell:SystemTray.Opacity="0"
    shell:SystemTray.BackgroundColor="Transparent">
    <phone:PhoneApplicationPage.DataContext>
        <libViewModels:cpViewModel></libViewModels:cpViewModel>
    </phone:PhoneApplicationPage.DataContext>
    <phone:PhoneApplicationPage.Resources>
        <Helpers:nanvisConverter x:Key="nanvisConverter"/>
        <Helpers:productnameConverter x:Key="productnameConverter"/>
        <Helpers:brandvisconvert x:Key="brandvisconvert"/>
        <Helpers:stringchangeConverter x:Key="stringchangeConverter"/>
        <Helpers:tickConverter x:Key="tickConverter"/>
        <Helpers:colorConverter x:Key="colorConverter"/>
        <Helpers:priceConverter x:Key="priceConverter"/>
        <Helpers:connectivitystringConverter x:Key="connectivitystringConverter"/>
    </phone:PhoneApplicationPage.Resources>
    <shell:SystemTray.ProgressIndicator>
        <shell:ProgressIndicator x:Name="systemtray"/>
    </shell:SystemTray.ProgressIndicator>

    <!--LayoutRoot 是放置所有頁面的根資料格-->
    <Grid x:Name="LayoutRoot" Loaded="LayoutRoot_Loaded" Background="#FFF7F7F7" Margin="0,32,0,0">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel 包含應用程式的名稱和頁面標題-->
        <StackPanel Grid.Row="0" Margin="12,5,0,28">
            <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left">
                <Grid Height="50.019" Margin="5" Width="50" Visibility="{Binding DataContext.historicalCurrent.brand, ConverterParameter=0, Converter={StaticResource brandvisconvert}, ElementName=historicalchartPage}">
                    <Path Data="F1M50,25.008C50,11.206 38.807,0 25.006,0 11.193,0 0,11.206 0,25.008 0,37.456 9.096,47.779 21.004,49.692L21.004,48.357C9.835,46.459 1.321,36.728 1.321,25.008 1.321,11.921 11.921,1.321 25.006,1.321 38.08,1.321 48.69,11.921 48.69,25.008 48.69,36.909 39.911,46.759 28.475,48.44L28.475,49.769C40.638,48.078,50,37.637,50,25.008" Fill="#FF134E8B" Margin="0,0,0,0.25"/>
                    <Path Data="F1M44.348,22.173C44.348,9.933 34.429,0 22.181,0 9.931,0 0,9.933 0,22.173 0,33.065 7.859,42.121 18.202,43.993L18.202,42.453C8.694,40.602 1.515,32.227 1.515,22.173 1.515,10.757 10.769,1.517 22.181,1.517 33.592,1.517 42.845,10.757 42.845,22.173 42.845,32.383 35.436,40.861 25.709,42.535L25.709,44.068C36.272,42.378,44.348,33.22,44.348,22.173" Fill="#FF134E8B" Margin="2.741,2.813,2.911,3.138"/>
                    <Path Data="F1M38.297,19.153C38.297,8.574 29.723,0 19.149,0 8.574,0 0,8.574 0,19.153 0,28.368 6.5,36.062 15.17,37.891L15.17,36.343C7.349,34.542 1.503,27.529 1.503,19.153 1.503,9.41 9.41,1.516 19.149,1.516 28.886,1.516 36.781,9.41 36.781,19.153 36.781,27.687 30.729,34.806 22.677,36.439L22.677,37.979C31.567,36.323,38.297,28.526,38.297,19.153" Fill="#FF134E8B" Margin="5.773,5.833,5.93,6.207"/>
                    <Path Data="F1M13.195,3.467C13.195,3.467,10.842,2.208,7.592,2.104L7.592,1.367C9.301,1.413 11.242,1.761 13.329,2.667 13.57,2.77 13.195,3.467 13.195,3.467 M1.153,3.646L0.837,2.889C0.837,2.889,3.166,1.481,6.756,1.367L6.756,2.106C5.021,2.162,3.093,2.568,1.153,3.646 M7.592,0.736L7.592,0 6.756,0 6.756,0.753C2.79,0.946 0,2.712 0,2.712 0,2.712 0.862,4.528 1.153,4.401 3.602,3.334 5.228,2.795 6.756,2.689L6.756,3.912 7.592,3.912 7.592,2.673C9.205,2.728 10.854,3.252 13.413,4.134 13.68,4.224 14.128,2.445 14.128,2.445 11.824,1.199 9.593,0.754 7.592,0.736" Fill="#FF134E8B" Margin="17.547,26.008,18.325,19.604"/>
                    <Path Data="F1M9.067,0C9.067,0 6.569,2.584 6.835,4.888 6.921,5.591 6.933,7.374 6.132,8.089 5.841,8.344 4.373,5.785 2.312,6.04 2.312,6.489 4.798,7.64 2.13,10.312 1.609,10.742 -3.121,17.334 3.464,18.046 3.853,18.089 -0.72,16 3.816,11.735 4.083,11.484 3.998,16.454 8.352,16.454 9.419,16.454 12.256,15.023 11.88,12.001 12.354,11.646 17.422,15.29 12.887,17.869 12.887,17.869 14.39,18.224 15.822,16.979 17.435,15.561 18.502,12.912 14.306,9.338 14.306,9.338 15.022,7.738 14.39,6.573 14.149,6.125 14.221,4.621 14.39,4.184 14.573,3.735 13.505,5.155 13.59,6.04 13.688,6.937 12.354,8.004 11.88,7.823 11.528,7.688 12.887,6.937 9.686,3.651 9.128,3.068 8.303,1.505 9.067,0" Fill="#FFEC1C23" Margin="16.57,8.985,16.184,22.987"/>
                    <Path Data="F1M0.379,0.001C0.379,0.001 0.514,2.622 2.429,3.778 2.55,3.851 -1.173,3.156 0.379,0.001" Fill="#FFEC1C23" Margin="19.691,22.364,27.877,23.873"/>
                    <Path Data="F1M2.33,0C2.559,0.156 3.408,3.356 0.013,3.778 -0.181,3.803 1.977,3.045 2.33,0" Fill="#FFEC1C23" Margin="27.116,22.43,20.292,23.81"/>
                    <Path Data="F1M1.357,0C1.357,0 1.746,2.996 1.866,3.29 2.049,3.705 0.569,2.49 0,0.444 0.181,0.237 1.357,0 1.357,0" Fill="#FF134E8B" Margin="19.586,30.32,28.532,16.328"/>
                    <Path Data="F1M0,0.149L1.213,0 1.273,4C1.273,4 1.929,4.296 2.935,4.348 3.02,4.354 2.874,12.712 2.874,12.712L2.377,12.683 2.159,4.918C2.159,4.918 0.655,4.711 0.268,4.268 0.134,4.117 0,0.149 0,0.149" Fill="#FF134E8B" Margin="21.987,29.905,25.051,7.402"/>
                    <Path Data="F1M2.729,2.6C2.438,2.455,2.123,2.342,1.832,2.254L1.893,1.369C2.245,1.446 2.632,1.559 3.068,1.723 3.068,1.723 3.08,2.092 2.729,2.6 M1.723,3.539L1.795,2.701C2.062,2.79 2.293,2.887 2.438,2.954 2.256,3.142 2.026,3.34 1.723,3.539 M0.534,2.475C0.789,2.476 1.043,2.511 1.273,2.56 1.237,3.046 1.177,3.543 1.079,3.92 0.934,3.996 0.776,4.07 0.607,4.146 0.559,4.165 0.534,3.282 0.534,2.475 M0.534,1.191C0.534,1.191 0.837,1.185 1.334,1.261 1.334,1.491 1.322,1.793 1.298,2.12 0.982,2.05 0.704,2.009 0.534,1.989z M1.953,0.874L1.965,0.086C1.965,0.086 1.443,0 1.383,0 1.395,0.124 1.371,0.434 1.359,0.679 0.995,0.646 0.098,0.545 0,0.545 0.061,0.96 0.012,4.828 0.012,4.828 0.012,4.828 3.215,4.115 3.979,1.449 4.014,1.33 1.953,0.874 1.953,0.874" Fill="#FF134E8B" Margin="25.564,29.819,20.457,15.372"/>
                    <Path Data="F1M0,0L0.691,0 0.691,3.022 0,3.022z" Fill="#FF134E8B" Margin="23.963,30.409,25.346,16.588"/>
                    <Path Data="M0.982,2.555C0.894,2.812 0.987,2.873 1.209,2.872 2.313,2.864 3.418,2.864 4.522,2.872 4.772,2.873 4.834,2.786 4.744,2.555z M4.749,1.929C4.837,1.674 4.742,1.613 4.522,1.615 3.418,1.622 2.314,1.622 1.21,1.615 0.965,1.613 0.893,1.694 0.984,1.929z M0.96,0.947L4.782,0.947C4.776,0.837,4.771,0.75,4.766,0.667L0.96,0.667z M4.782,4.183L4.012,4.183C3.997,4.157 3.982,4.142 3.981,4.126 3.944,3.595 3.944,3.595 3.395,3.595 3.017,3.595 2.639,3.595 2.261,3.595 1.824,3.596 1.818,3.602 1.799,4.038 1.797,4.082 1.789,4.126 1.783,4.182L0.993,4.182C0.981,4.155 0.959,4.123 0.954,4.09 0.889,3.612 0.89,3.612 0.383,3.608 0.029,3.606 0.003,3.583 0.003,3.232 0.002,2.274 0.008,1.316 0,0.358 -0.003,0.096 0.09,-0.002 0.355,0 2.032,0.007 3.709,0.003 5.386,0.004 5.716,0.004 5.752,0.04 5.753,0.369 5.754,1.328 5.754,2.286 5.753,3.244 5.752,3.58 5.724,3.605 5.39,3.608 5.335,3.609 5.28,3.608 5.224,3.609 4.855,3.612 4.834,3.632 4.812,3.988 4.808,4.05 4.794,4.111 4.782,4.183" Fill="#FFEC1C23" Margin="21.843,45.836,22.403,0"/>
                    <Path Data="M0.001,0L0.711,0C0.735,0.244 0.893,0.285 1.113,0.28 1.693,0.267 2.272,0.274 2.852,0.276 3.205,0.277 3.286,0.361 3.292,0.718 3.293,0.773 3.292,0.828 3.292,0.884 3.292,1.558 3.293,1.552 2.611,1.536 2.441,1.532 2.37,1.475 2.393,1.312 2.433,1.031 2.293,0.969 2.041,0.974 1.48,0.988 0.918,0.979 0.357,0.979 0.022,0.978 0.003,0.957 0.001,0.612 0,0.42 0.001,0.228 0.001,0" Fill="#FFEC1C23" Margin="24.223,43.245,22.485,5.234"/>
                    <Path Data="M3.299,1.175C2.943,1.175 2.648,1.196 2.357,1.165 2.225,1.152 2.093,1.049 1.977,0.964 1.746,0.794 1.508,0.77 1.297,0.963 0.905,1.321 0.456,1.132 0.03,1.168 0.02,1.145 0.01,1.121 0,1.098 0.158,0.98 0.315,0.861 0.474,0.745 0.795,0.511 1.109,0.269 1.441,0.054 1.527,-0.001 1.704,-0.021 1.78,0.029 2.261,0.353 2.727,0.701 3.196,1.043 3.223,1.062 3.238,1.095 3.299,1.175" Fill="#FFEC1C23" Margin="23.863,44.327,22.838,4.506"/>
                    <Path Data="M0,0L1.751,0 1.751,0.655 0,0.655z" Fill="#FFEC1C23" Margin="21.84,43.554,26.409,5.81"/>
                    <Path Data="M1.664,0C1.749,0.224 1.82,0.41 1.895,0.608 1.826,0.639 1.779,0.664 1.729,0.68 1.237,0.846 0.745,1.011 0.224,1.184 0.149,0.978 0.082,0.792 0,0.566 0.555,0.378 1.094,0.194 1.664,0" Fill="#FFEC1C23" Margin="21.874,44.499,26.231,4.336"/>
                </Grid>
                <Grid Height="50" Canvas.Left="84.937" Margin="5" Width="50" Visibility="{Binding DataContext.historicalCurrent.brand, ConverterParameter=1, Converter={StaticResource brandvisconvert}, ElementName=historicalchartPage}">
                    <Path Data="F1M0,25L25,25 25,0 0,0z" Fill="Black" Margin="25,0,0,25"/>
                    <Path Data="F1M0,25L25,25 25,0 0,0z" Fill="#FFEAE71E" Margin="0,0,25,25"/>
                    <Path Data="F1M0,25L25,25 25,0 0,0z" Fill="#FF0084CC" Margin="0,25,25,0"/>
                    <Path Data="F1M0,25L25,25 25,0 0,0z" Fill="#FFEC2D3D" Margin="25,25,0,0"/>
                    <Path Data="M18.16,12.69C16.137,17.704 12.27,19.084 7.437,18.264 3.506,17.595 1.473,14.848 0.335,11.341 -0.741,8.032 0.866,3.941 3.899,1.799 6.962,-0.367 12.45,-0.676 14.878,1.416 17.12,3.35 18.214,5.833 16.567,8.688 15.183,11.084 12.843,11.409 9.575,9.922 9.644,9.698 9.644,9.354 9.794,9.264 11.256,8.409 12.744,7.593 14.225,6.768 13.071,5.605 12.09,3.77 10.728,3.423 8.017,2.734 5.538,4.306 5.307,7.012 5.123,9.18 5.814,12.572 7.293,13.461 9.405,14.728 12.594,14.375 15.32,14.355 16.27,14.347 17.213,13.276 18.16,12.69" Fill="#FFFE2834" Margin="3.563,3.475,28.277,28.041"/>
                    <Path Data="M13.887,8.489C15.603,8.054 17.255,7.638 18.991,7.2 19.223,13.265 13.429,19.495 8.027,19.439 3.322,19.391 -0.587,14.939 0.073,9.819 0.413,7.172 1.573,4.601 2.581,2.083 2.916,1.249 3.931,0.686 4.636,0 5.142,0.922 5.749,1.805 6.117,2.779 6.37,3.448 6.291,4.241 6.417,5.581 8.649,3.925 10.538,2.521 13.452,0.358 13.616,3.401 13.745,5.834 13.887,8.489" Fill="#FFFADE11" Margin="28.704,27.953,2.298,2.608"/>
                    <Path Data="M15.513,19.179C12.593,17.36 10.448,15.114 8.034,14.777 5.631,14.445 2.962,16.03 0,16.049 1.847,14.346 3.694,12.643 5.792,10.708 5.258,9.88 4.694,9.005 3.936,7.827 5.582,7.641 6.919,7.489 8.676,7.289 6.675,4.834 4.861,2.611 2.74,0.007 8.034,-0.29 12.518,8.292 17.896,0.605 17.776,2.394 17.656,4.184 17.535,5.986 19.548,7.024 21.481,8.023 24.526,9.596 18.583,10.605 14.368,12.512 15.513,19.179" Fill="#FFF9E007" Margin="0.907,28.848,24.567,1.972"/>
                    <Path Data="M8.046,14.396C11.315,14.297 14.182,11.235 14.037,7.994 13.897,4.807 11.196,2.32 7.902,2.344 4.365,2.371 1.866,5.016 1.997,8.594 2.113,11.732 4.985,14.489 8.046,14.396 M15.741,8.496C15.721,13.121 12.508,16.448 8.08,16.427 3.621,16.406 -0.039,12.719 0.001,8.287 0.042,3.963 3.917,-0.012 8.08,0 12.514,0.012 15.764,3.616 15.741,8.496" Fill="White" Margin="29.972,4.526,4.288,29.047"/>
                    <Path Data="M6.054,12.052C2.993,12.145 0.121,9.388 0.005,6.25 -0.126,2.672 2.373,0.027 5.91,0 9.204,-0.024 11.905,2.463 12.045,5.65 12.19,8.891 9.323,11.953 6.054,12.052" Fill="#FF0082D1" Margin="31.964,6.87,5.986,31.076"/>
                </Grid>
                <TextBlock Text="{Binding DataContext.historicalCurrent.kind, Converter={StaticResource productnameConverter}, ElementName=historicalchartPage}" Style="{StaticResource PhoneTextNormalStyle}" Foreground="Black" FontSize="45"/>
            </StackPanel>
        </StackPanel>
        <StackPanel x:Name="ContentPanel" Margin="12,-30,12,10" Grid.Row="1">
            <Border BorderThickness="0,0,0,1" BorderBrush="Black" Margin="0,3">
                <TextBlock Text="油價走勢圖" FontSize="26"/>
            </Border>
            <TextBlock Text="本功能由於使用的第三方工具庫 Oxyplot 圖表Windows Phone 8 版尚在測試中，暫不開放" TextWrapping="Wrap" Foreground="#FF919191"></TextBlock>
            <!-- <oxy:Plot Model="{Binding DataContext.historicalModel, ElementName=historicalchartPage}" BorderBrush="Black" BorderThickness="1" Width="400" Height="400"/> -->
            <StackPanel>
                <Border BorderThickness="0,0,0,1" BorderBrush="Black" Margin="0,3">
                    <TextBlock Text="相關數據" FontSize="26"/>
                </Border>
                <Border BorderBrush="#FFDADADA" BorderThickness="3">
                    <Grid Height="88" Background="#E5FFFFFF">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition Width="3*" />
                        </Grid.ColumnDefinitions>
                        <Border Grid.Column="0" Grid.Row="0" Background="#FFDADADA">
                            <TextBlock TextWrapping="Wrap" Text="本周價格" Margin="5,7,0,0"/>
                        </Border>
                        <Border Grid.Column="0" Grid.Row="1" Background="#FFDADADA">
                            <TextBlock TextWrapping="Wrap" Text="儲存價格" Margin="5,7,0,0"/>
                        </Border>
                        <Border Grid.Column="1" Grid.Row="0" BorderThickness="0,0,0,2" BorderBrush="#FFDADADA">
                            <StackPanel Margin="9,0,0,0" VerticalAlignment="Center" Orientation="Horizontal">
                                <TextBlock TextWrapping="Wrap" Text="{Binding DataContext.historicalCurrent.price, Converter={StaticResource priceConverter}, ElementName=historicalchartPage, StringFormat=\{0:N1\}}"/>
                                <Grid Width="40"/>
                                <TextBlock Text="{Binding DataContext.historicalCurrent.datetick, Converter={StaticResource tickConverter}, ElementName=historicalchartPage, StringFormat=\{0:d\}}" Margin="155,0,0,0"/>
                            </StackPanel>
                        </Border>
                        <Border Grid.Column="1" Grid.Row="1" BorderThickness="0,0,0,2" BorderBrush="#FFDADADA">
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="9,0,0,0">
                                <StackPanel x:Name="stackPanel" Orientation="Horizontal" Visibility="{Binding DataContext.historicalSaved.price, ConverterParameter=1, Converter={StaticResource nanvisConverter}, ElementName=historicalchartPage}">
                                    <TextBlock TextWrapping="Wrap" Text="{Binding DataContext.historicalSaved.price, Converter={StaticResource priceConverter}, ElementName=historicalchartPage, StringFormat=\{0:N1\}}"/>
                                    <StackPanel Orientation="Horizontal" Width="40">
                                        <TextBlock Text="(" Foreground="{Binding DataContext.savedchange, Converter={StaticResource colorConverter}, ElementName=historicalchartPage}"/>
                                        <TextBlock Text="{Binding DataContext.savedchange, Converter={StaticResource stringchangeConverter}, ElementName=historicalchartPage, StringFormat=\{0:N1\}}" Foreground="{Binding DataContext.savedchange, Converter={StaticResource colorConverter}, ElementName=historicalchartPage}"/>
                                        <TextBlock Text=")" Foreground="{Binding DataContext.savedchange, Converter={StaticResource colorConverter}, ElementName=historicalchartPage}"/>
                                    </StackPanel>
                                    <TextBlock Text="{Binding DataContext.historicalSaved.datetick, Converter={StaticResource tickConverter}, ElementName=historicalchartPage, StringFormat=\{0:d\}}" Margin="155,0,0,0"/>
                                </StackPanel>
                                <TextBlock Text="請在「目前價格」按油槍按鈕儲存價格" Foreground="#FF6A6A6A" Visibility="{Binding DataContext.historicalSaved.price, ConverterParameter=0, Converter={StaticResource nanvisConverter}, ElementName=historicalchartPage}" FontFamily="Portable User Interface" FontSize="18"/>
                            </StackPanel>
                        </Border>
                    </Grid>
                </Border>
            </StackPanel>
            <Border BorderThickness="0,0,0,1" BorderBrush="Black" Margin="0,3">
                <TextBlock Text="其他統計數據" FontSize="26"/>
            </Border>
            <Border BorderBrush="#FFDADADA" BorderThickness="3">
                <Grid Height="88" Background="#E5FFFFFF">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition Width="2*" />
                        <ColumnDefinition />
                        <ColumnDefinition Width="2*" />
                    </Grid.ColumnDefinitions>
                    <Border Grid.Column="0" Grid.Row="0" Background="#FFDADADA">
                        <TextBlock TextWrapping="Wrap" Text="最高價" Margin="5,7,0,0"/>
                    </Border>
                    <Border Grid.Column="1" Grid.Row="0" BorderThickness="0,0,0,2" BorderBrush="#FFDADADA">
                        <TextBlock TextWrapping="Wrap" Text="{Binding DataContext.maxPrice, Converter={StaticResource priceConverter}, ElementName=historicalchartPage, StringFormat=\{0:N1\}}" Margin="9,7,10,0"/>
                    </Border>
                    <Border Grid.Column="2" Grid.Row="0" Background="#FFDADADA">
                        <TextBlock TextWrapping="Wrap" Text="最低價" Margin="5,7,0,0"/>
                    </Border>
                    <Border Grid.Column="3" Grid.Row="0" BorderThickness="0,0,0,2" BorderBrush="#FFDADADA">
                        <TextBlock TextWrapping="Wrap" Text="{Binding DataContext.minPrice, Converter={StaticResource priceConverter}, ElementName=historicalchartPage, StringFormat=\{0:N1\}}" Margin="9,7,10,0"/>
                    </Border>
                    <Border Grid.Column="0" Grid.Row="1" Background="#FFDADADA">
                        <TextBlock TextWrapping="Wrap" Text="平均價" Margin="5,7,0,0"/>
                    </Border>
                    <Border Grid.Column="1" Grid.Row="1">
                        <TextBlock TextWrapping="Wrap" Text="{Binding DataContext.avgPrice, Converter={StaticResource priceConverter}, ElementName=historicalchartPage, StringFormat=\{0:N1\}}" Margin="9,7,10,0"/>
                    </Border>
                    <Border Grid.Row="1" Grid.Column="2" Background="#FFDADADA">
                        <TextBlock TextWrapping="Wrap" Text="預測價" Margin="5,7,0,0"/>
                    </Border>
                    <Border Grid.Column="3" Grid.Row="1">
                        <TextBlock TextWrapping="Wrap" Text="{Binding DataContext.predictPrice, Converter={StaticResource priceConverter}, ElementName=historicalchartPage, StringFormat=\{0:N1\}}" Margin="9,7,10,0"/>
                    </Border>
                </Grid>
            </Border>
        </StackPanel>
        <Grid HorizontalAlignment="Left" Height="32" Margin="0,-32,0,0" VerticalAlignment="Top" Width="480" Background="{StaticResource PhoneAccentBrush}">
            <StackPanel x:Name="titlebar" Margin="10,0,0,0">
                <StackPanel.DataContext>
                    <libViewModels:infoViewModel/>
                </StackPanel.DataContext>
                <TextBlock x:Name="title" HorizontalAlignment="Left" TextWrapping="Wrap" Text="台灣油價查詢" VerticalAlignment="Top" Width="132" Foreground="White"/>
                <TextBlock Text="{Binding DataContext.connectivity, Converter={StaticResource connectivitystringConverter}, ElementName=titlebar}" Foreground="White"/>
            </StackPanel>
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>